package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.LikeMessage;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.domain.Wish;
import cn.wolfcode.trip.base.query.CollectionQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.WishQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface IUserService {

    void register(User user);

    User login(User user);

    PageInfo<User> query(QueryObject qo);

    void update(User user);

    User selectById(Long id);

    PageInfo<?> queryForCollections(CollectionQueryObject qo);

    int getByTravelId(Long travelId);

    void changeTravelCollection(Long travelId,int type);

    int getBystrategyId(Long strategyId);

    void changeStrategyCollection(Long strategyId, int type);

    int getBydailyId(Long dailyId);//查询当前用户是否已收藏该日报

    void changeDailyCollection(Long dailyId, int type);//修改日报的收藏状态

    int getFansCount(Long userId);//查询用户的粉丝数

    int getFocusCount(Long fansId);//查询被访问人的关注数

    int judge(Long beVisitedId, Long currentId);//判断当前用户是否是被访问的粉丝

    void addFocus(Long beVisitedId, Long currentId);//添加关注

    void deleteFocus(Long beVisitedId, Long currentId);//取消关注

    void cancelLike(Long articleId, Integer type);

    void like(Long articleId, Integer type);

    PageInfo queryLikeMessage(QueryObject qo);

    PageInfo<Wish> listForWishes(WishQueryObject qo);//查询当前用户心愿单

    void saveWish(Long strategyId);//添加心愿

    void deleteWish(Long strategyId);//删除心愿

    void updateLikeMessageState(List<LikeMessage> list);

    Integer queryTotalLikeNum(Long authorId);

    Integer queryTotalNoticeNum(Long userId);

    PageInfo selectNoticeList(Long userId,QueryObject qo);

    void updateNoticeState(Long userId);

    Map selectNoticeState(Long userId);

    int getBystrategyDetailId(Long strategyDetailId);//查询攻略文章是否被该用户收藏

    void changeStrategyDetailCollection(Long strategyDetailId, int type);//修改攻略文章收藏状态

    int[] coutForAll(Long beVisitedId);//查询被访问者的游记,点评,心愿数量

    PageInfo ListByUserIdAndType(QueryObject qo,Long beVisitedId, int type);//查询被访问者的游记,点评,心愿列表

    PageInfo ListForFocus(QueryObject qo);//查询当前用户的关注列表

    PageInfo ListForFans(QueryObject qo);//查询当前用户的粉丝列表

}
